package com.example.memurbac_service.servicelmp;

import com.example.memurbac_service.dao.AuthMapper;
import com.example.memurbac_service.pojo.Auth;
import com.example.memurbac_service.service.AuthService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AuthServiceImpl implements AuthService {
    @Autowired
    AuthMapper mapper;

    @Override
    public List<Auth> SelectAuth() {
        return mapper.SelectAuth();
    }

    @Override
    public List<Auth> getSelectAuth(String auth_name) {
        return mapper.getSelectAuth(auth_name);
    }

    @Override
    public int AddAuth(Auth auth) {
        return mapper.AddAuth(auth);
    }

    @Override
    public int DelAuth(int id) {
        return mapper.DelAuth(id);
    }

    @Override
    public int UpdAuth(int id, String auth_name, String auth_desc,int memuid) {
        return mapper.UpdAuth(id, auth_name, auth_desc, memuid);
    }

    @Override
    public int AddAuthmemu(Auth auth) {
      return   mapper.AddAuthmemu(auth);
    }

    @Override
    public int offauth(int authid) {
        return mapper.offauth(authid);
    }

    @Override
    public int onauth(int authid) {
        return mapper.onauth(authid);
    }

    //根据id查询权限信息
    @Override
    public Auth selectidauth(int authid) {
        return mapper.selectidauth(authid);
    }
}
